<?php

namespace App\Library\Traits\Orm;

use App\Models\AuctionModel;
use App\Models\ShopUserModel;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasOne;

trait AuctionBidOrmTrait
{
    public function auction(): HasOne
    {
        return self::HasOne(AuctionModel::class, 'id', 'auction_id');
    }

    public function bidder(): BelongsTo
    {
        return self::BelongsTo(ShopUserModel::class, 'user_id', 'user_id');
    }
}
